Module Main


    Sub Main()
        gLog = New Logger
        gSessionManager = New SessionManager
        gEvtStopServer = New Threading.ManualResetEvent(False)
        Dim ml As New MainListener

        Dim thListen As New Threading.Thread(AddressOf ml.ServerProc)
        thListen.Start()

        'Debug.Print(AccountUtils.EncodePassword("asdf"))
        'Dim a1 As New Account
        'Dim a2 As New Account
        'Debug.Print(a1.GetHashCode)
        'If a1.Equals(a2) Then
        '    gLog.LogMsg("OK")
        'Else
        '    gLog.LogMsg("ERROR")
        'End If
        'Console.ReadKey()

        'Return
        'Dim i As Integer = 0
        'Do Until i = 1000
        '    i = i + 1
        '    gLog.LogMsg("Test")
        'Loop
        'gLog.LogMsg("Test")
        'gLog.LogError("Test")
        'gLog.LogDebug("Test")
        'gLog.LogMsg("Test")


        Console.ReadKey()
        gLog.LogMsg("Server shutting down")
        gEvtStopServer.Set()
        Console.ReadKey()
    End Sub

End Module
